package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallMetaHoliday;
import com.appkubes.mall.core.po.MallMetaHolidayExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallMetaHolidayMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMetaHolidaySqlProvider.class, method="countByExample")
    long countByExample(MallMetaHolidayExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallMetaHolidaySqlProvider.class, method="deleteByExample")
    int deleteByExample(MallMetaHolidayExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_meta_holiday",
        "where holiday_key = #{holidayKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String holidayKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_meta_holiday (holiday_key, holiday, ",
        "holiday_int, `type`, ",
        "create_time, update_time, ",
        "version)",
        "values (#{holidayKey,jdbcType=VARCHAR}, #{holiday,jdbcType=VARCHAR}, ",
        "#{holidayInt,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallMetaHoliday record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallMetaHolidaySqlProvider.class, method="insertSelective")
    int insertSelective(MallMetaHoliday record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMetaHolidaySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="holiday_key", property="holidayKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="holiday", property="holiday", jdbcType=JdbcType.VARCHAR),
        @Result(column="holiday_int", property="holidayInt", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallMetaHoliday> selectByExampleWithRowbounds(MallMetaHolidayExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallMetaHolidaySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="holiday_key", property="holidayKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="holiday", property="holiday", jdbcType=JdbcType.VARCHAR),
        @Result(column="holiday_int", property="holidayInt", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallMetaHoliday> selectByExample(MallMetaHolidayExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "holiday_key, holiday, holiday_int, `type`, create_time, update_time, version",
        "from mall_meta_holiday",
        "where holiday_key = #{holidayKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="holiday_key", property="holidayKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="holiday", property="holiday", jdbcType=JdbcType.VARCHAR),
        @Result(column="holiday_int", property="holidayInt", jdbcType=JdbcType.INTEGER),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallMetaHoliday selectByPrimaryKey(String holidayKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMetaHolidaySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallMetaHoliday record, @Param("example") MallMetaHolidayExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMetaHolidaySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallMetaHoliday record, @Param("example") MallMetaHolidayExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallMetaHolidaySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallMetaHoliday record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_meta_holiday
     *
     * @mbg.generated
     */
    @Update({
        "update mall_meta_holiday",
        "set holiday = #{holiday,jdbcType=VARCHAR},",
          "holiday_int = #{holidayInt,jdbcType=INTEGER},",
          "`type` = #{type,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where holiday_key = #{holidayKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallMetaHoliday record);
}